package com.ruoyi.hualian.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hualian.mapper.HlToothMapper;
import com.ruoyi.hualian.domain.HlTooth;
import com.ruoyi.hualian.service.IHlToothService;

/**
 * 齿形Service业务层处理
 * 
 * @author hujian
 */
@Service
public class HlToothServiceImpl implements IHlToothService 
{
    @Autowired
    private HlToothMapper hlToothMapper;

    /**
     * 根据已知信息查询具体对象信息
     * @param tooth 已知信息
     * @return 具体对象信息
     */
    @Override
    public HlTooth selectOne(HlTooth tooth) {
        LambdaQueryWrapper<HlTooth> hlToothWrapper = new LambdaQueryWrapper<>();

        hlToothWrapper.eq(HlTooth::getTooth, tooth.getTooth());

        return hlToothMapper.selectOne(hlToothWrapper);
    }

    /**
     * 根据集合插入数据库
     * @param hlToothList 集合
     * @return 结果
     */
    @Override
    public int insertList(List<HlTooth> hlToothList) {
        return hlToothMapper.insertList(hlToothList);
    }


    /**
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     */


    /**
     * 查询齿形
     * 
     * @param toothId 齿形主键
     * @return 齿形
     */
    @Override
    public HlTooth selectHlToothByToothId(Long toothId)
    {
        return hlToothMapper.selectHlToothByToothId(toothId);
    }

    /**
     * 查询齿形列表
     * 
     * @param hlTooth 齿形
     * @return 齿形
     */
    @Override
    public List<HlTooth> selectHlToothList(HlTooth hlTooth)
    {
        return hlToothMapper.selectHlToothList(hlTooth);
    }

    /**
     * 新增齿形
     * 
     * @param hlTooth 齿形
     * @return 结果
     */
    @Override
    public int insertHlTooth(HlTooth hlTooth)
    {
        return hlToothMapper.insertHlTooth(hlTooth);
    }

    /**
     * 修改齿形
     * 
     * @param hlTooth 齿形
     * @return 结果
     */
    @Override
    public int updateHlTooth(HlTooth hlTooth)
    {
        return hlToothMapper.updateHlTooth(hlTooth);
    }

    /**
     * 批量删除齿形
     * 
     * @param toothIds 需要删除的齿形主键
     * @return 结果
     */
    @Override
    public int deleteHlToothByToothIds(Long[] toothIds)
    {
        return hlToothMapper.deleteHlToothByToothIds(toothIds);
    }

    /**
     * 删除齿形信息
     * 
     * @param toothId 齿形主键
     * @return 结果
     */
    @Override
    public int deleteHlToothByToothId(Long toothId)
    {
        return hlToothMapper.deleteHlToothByToothId(toothId);
    }
}
